package com.ukao.steward.consts;

import com.ukao.steward.util.L;
import com.ukao.steward.util.SpUtils;
import com.ukao.steward.util.Utils;


/**
 * Created by Administrator on 2017/2/23.
 * 保存惨数类
 */

public class SaveParams {
    public static  boolean isPassCard() {
        return (boolean) SpUtils.get(Utils.getContext(),"isPassCard",false);
    }

    public static  void setIsPassCard(boolean isPassCard) {
        SpUtils.put(Utils.getContext(), "isPassCard", isPassCard);
    }
    /**
     * 获得账户
     * @return
     */
    public    static  String getAccount() {
        return SpUtils.get(Utils.getContext(),"account","").toString();
    }

    public  static  void setAccount(String account) {

        SpUtils.put(Utils.getContext(), "account", account);
    }

    public  static String getAlias() {
       String   alias=SpUtils.get(Utils.getContext(),"alias","").toString();
        L.i("alias="+alias);
        return alias;
    }

    public  static void setAlias(String alias) { /*別名*/
        SpUtils.put(Utils.getContext(), "alias", alias);
    }

    /*是否登录*/
    public static boolean isLogin() {

        return (boolean) SpUtils.get(Utils.getContext(),"isLogin",false);
    }
    /*是否登录*/
    public  static void setLogin(boolean login) {

        SpUtils.put(Utils.getContext(), "isLogin", login);
    }

    public static   boolean getislogistics() {

        return (boolean) SpUtils.get(Utils.getContext(),"islogistics",false);
    }

    public  static void setIslogistics(int islogistics) {

        boolean  receiving=false;
        if (islogistics==13){
            receiving=true;
        }
        SpUtils.put(Utils.getContext(), "islogistics", receiving);
    }

    public  static boolean getIsRest() {
        return (boolean) SpUtils.get(Utils.getContext(),"isRest",true);
    }

    public static void saveIsRest(boolean isRest) {

        SpUtils.put(Utils.getContext(), "isRest", isRest);
    }

    public  static String getSerialcount() {
        return  SpUtils.get(Utils.getContext(),"serialcount","").toString();

    }

    public static  void setSerialcount(String storeName) {

          SpUtils.put(Utils.getContext(),"serialcount",storeName);
    }


    public static void saveToken( String token) {
        SpUtils.put(Utils.getContext(), "token", token);

    }

    public static String getToken( ) {
        return      SpUtils.get(Utils.getContext(),"token","" ).toString();

    }

    public static void saveUseName( String name) {
        SpUtils.put(Utils.getContext(), "name", name);

    }

    public static String getUseName(  ) {

      return  SpUtils.get(Utils.getContext(), "name","").toString();

    }

    public static void saveHeadimgPath( String phone) {
        SpUtils.put(Utils.getContext(), "imgPath", phone);

    }
    public static String getHeadimgPath(  ) {
        return   SpUtils.get(Utils.getContext(), "imgPath", "").toString();

    }

    public static void saveUsePhone( String phone) {
        SpUtils.put(Utils.getContext(), "phone", phone);

    }
    public static String getSaveUsePhone(  ) {

        return   SpUtils.get(Utils.getContext(), "phone", "").toString();

    }

}
